package com.prs.crm.domain.cqunicom;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Person;

/**
 * @author  WangTing
 *
 * 创建时间：2011-3-5 
 * 
 */

////////////////电影院管理

@Entity
@Table(name="cq_movie")
public class Movie extends BaseEntity{
	
	private static final long serialVersionUID = 1L;
	
	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	
	
	
	private Integer id;
	
  

	/**
	 *
	 * 电影院名称
	 */
	private String name;
	
	 /**
	 *
	 * 用户密码
	 */
	private String  password;
	/**
	 *
	 * 用户权限
	 */
	private String  userStyle;
	
	 /**
	 *
	 * 联系人
	 */
	private String  linkman;


	
	 /**
	 *
	 * 联系电话
	 */
	
	private String  phone_No;
	
	 /**
	 *
	 * 备注
	 */
	
	private String  remark;
	
//	@OneToMany(mappedBy = "movie")
//	@Cascade({ org.hibernate.annotations.CascadeType.ALL,
//			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
//	private Set<Person> person;
	
	/**
	 * 影片
	 */
	@OneToMany(mappedBy = "movieA")
	@Cascade({ org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Set<Film> film;
	
	
	/**
	 * 派单列表
	 */
	@OneToMany(mappedBy = "movieB")
	@Cascade({ org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Set<PieList> pieList;
	/**
	 * 票务员
	 */
	@OneToMany(mappedBy = "movieTick")
	@Cascade({ org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Set<Ticketer> ticketer;
	/**
	 * 票务员
	 */
	@OneToMany(mappedBy = "movieSender")
	@Cascade({ org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Set<Sender> sender;
	 
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<Film> getFilm() {
		return film;
	}

	public void setFilm(Set<Film> film) {
		this.film = film;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getPassword() {
		return password;
	}

	public Set<PieList> getPieList() {
		return pieList;
	}

	public void setPieList(Set<PieList> pieList) {
		this.pieList = pieList;
	}

	public String getLinkman() {
		return linkman;
	}

	public Set<Sender> getSender() {
		return sender;
	}

	public void setSender(Set<Sender> sender) {
		this.sender = sender;
	}

	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	public String getPhone_No() {
		return phone_No;
	}

	public void setPhone_No(String phone_No) {
		this.phone_No = phone_No;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUserStyle() {
		return userStyle;
	}

	public void setUserStyle(String userStyle) {
		this.userStyle = userStyle;
	}

//	public Set<Person> getPerson() {
//		return person;
//	}
//
//	public void setPerson(Set<Person> person) {
//		this.person = person;
//	}

	public Set<Ticketer> getTicketer() {
		return ticketer;
	}

	public void setTicketer(Set<Ticketer> ticketer) {
		this.ticketer = ticketer;
	}




	
	
}
